package com.sgb.kjwl.view.ui.activity.packers;

import android.content.Context;
import android.content.Intent;

import androidx.databinding.DataBindingUtil;

import com.sgb.kjwl.AppActivity;
import com.sgb.kjwl.R;
import com.sgb.kjwl.databinding.AtFigureCheckBinding;
import com.sgb.kjwl.view.ui.fragment.packers.FigureCheckFragment;
import com.swgk.core.util.SharedPreferenceUtil;

/*
 * 承载工队图查的Activity界面
 * LiWei 2021/10/12
 * */
public class FigureCheckActivity extends AppActivity {

    private AtFigureCheckBinding binding;

    public static void start(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, FigureCheckActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void initView() {
        binding = DataBindingUtil.setContentView(this, R.layout.at_figure_check);


        getSupportFragmentManager()
                .beginTransaction()
                .add(R.id.fragment_container, FigureCheckFragment.getInstance(true))
                .commitAllowingStateLoss();

        String provinceName = SharedPreferenceUtil.getInstance().getSaveStringData(SharedPreferenceUtil.Province, "新疆维吾尔自治区");
        String cityName = SharedPreferenceUtil.getInstance().getSaveStringData(SharedPreferenceUtil.City, "乌鲁木齐市");
        binding.actionBar.setMenuFunctionVisible(true);
        binding.actionBar.setMenuFunctionText(provinceName + cityName);
    }
}
